package com.mrd.gtimpframe.service.impl;

import com.mrd.gtimpframe.entity.Company;
import com.mrd.gtimpframe.repository.CompanyMapper;
import com.mrd.gtimpframe.service.CompanyService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by dusy on 2017/9/22.
 */
@Service
public class CompanyServiceImpl implements CompanyService{
    @Autowired
    private CompanyMapper companyMapper;

    @Override
    public int deleteByPrimaryKey(String comId) {
        return companyMapper.deleteByPrimaryKey(comId);
    }

    @Override
    public int insert(Company record) {
        return companyMapper.insert(record);
    }

    @Override
    public int insertSelective(Company record) {
        return companyMapper.insertSelective(record);
    }

    @Override
    public Company selectByPrimaryKey(String comId) {
        return companyMapper.selectByPrimaryKey(comId);
    }

    @Override
    public int updateByPrimaryKeySelective(Company record) {
        return companyMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Company record) {
        return companyMapper.updateByPrimaryKey(record);
    }

    @Override
    public Company selectByUserId(String userId) {
        return companyMapper.selectByUserId(userId);
    }

    @Override
    public Company selectSupplierByDecId(String did) {
        return companyMapper.selectSupplierByDecId(did);
    }
}
